import type { BaiduModelId } from "@roo-code/types"
import { baiduDefaultModelId, baiduModels } from "@roo-code/types"
import type { ApiHandlerOptions } from "../../shared/api"
import { BaseOpenAiCompatibleProvider } from "./base-openai-compatible-provider"

export class BaiduHandler extends BaseOpenAiCompatibleProvider<BaiduModelId> {
	constructor(options: ApiHandlerOptions) {
		super({
			...options,
			providerName: "百度文心一言",
			baseURL: "https://qianfan.baidubce.com/v2",
			apiKey: options.baiduApiKey,
			defaultProviderModelId: baiduDefaultModelId,
			providerModels: baiduModels,
			defaultTemperature: 0.7,
		})
	}

	override getModel() {
		return super.getModel()
	}
}
